Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ExcelMgr = exports.TableName = undefined;
var $2CSVParser = require("CSVParser");
(function (e) {
  e.levelTable = "levelTable";
  e.plantTable = "plantTable";
  e.zombieTable = "zombieTable";
  e.bulletTable = "bulletTable";
  e.lotteryTable = "lotteryTable";
  e.shopTable = "shopTable";
  e.priceTable = "priceTable";
  e.guideTable = "guideTable";
  e.taskTable = "taskTable";
  e.timeTable = "timeTable";
  e.time1Table = "time1Table";
  e.bwzjsTable = "bwzjsTable";
  e.bwzdaifuTable = "bwzdaifuTable";
  e.blq_zaxiang = "blq_zaxiang";
  e.bxq_jianguo = "bxq_jianguo";
  e.blq_js = "blq_js";
})(exports.TableName || (exports.TableName = {}));
var exp_ExcelMgr = /* */function () {
  function _ctor() {
    babel_classCallCheck(this, _ctor);
    this.csvTableForArr = [];
    this.tableCast = {};
    this.tableComment = {};
    this.csvTables = {};
  }
  babel_createClass(_ctor, [{
    key: "AddExcelArrTable",
    value: function AddExcelArrTable(e, t) {
      var a = {};
      var _i8 = [];
      $2CSVParser.default.parse(t, {
        header: true
      }, function (e, t) {
        a[e[t]] = e;
        _i8.push(e);
      });
      this.tableCast[e] = $2CSVParser.default.opts.cast;
      this.tableComment[e] = $2CSVParser.default.opts.comment;
      this.csvTableForArr[e] = _i8;
      window[e + "Arr"] = _i8;
    }
  }, {
    key: "AddExcelTable",
    value: function AddExcelTable(e, t) {
      if (!this.csvTables[e]) {
        var a = {};
        $2CSVParser.default.parse(t, {
          header: true
        }, function (e, t) {
          a[e[t]] = e;
        });
        this.tableCast[e] = $2CSVParser.default.opts.cast;
        this.tableComment[e] = $2CSVParser.default.opts.comment;
        this.csvTables[e] = a;
        window[e] = a;
      }
    }
  }, {
    key: "GetExcelObject",
    value: function GetExcelObject(e) {
      return this.csvTables[e];
    }
  }, {
    key: "GetExcelArray",
    value: function GetExcelArray(e) {
      return this.csvTableForArr[e];
    }
  }], [{
    key: "instance",
    get() {
      this._instance || (this._instance = new _ctor());
      return this._instance;
    }
  }]);
  return _ctor;
}();
exports.ExcelMgr = exp_ExcelMgr;
exp_ExcelMgr._instance = null;